﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.Windows;
using System.Windows.Media;

namespace WPF.Element.UI.CustomControls
{
    /// <summary>
    /// 输入框
    /// </summary>
    public class ElInput : TextBox
    {
        static ElInput()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(ElInput), new FrameworkPropertyMetadata(typeof(ElInput)));
        }


        /// <summary>
        /// 圆角大小
        /// </summary>
        public static readonly DependencyProperty ElCornerRadiusProperty =
            DependencyProperty.Register("ElCornerRadius", typeof(CornerRadius), typeof(ElInput));   // new PropertyMetadata(0, null)

        /// <summary>
        /// 圆角 设置这个属性可以直接设置圆角
        /// </summary>
        public CornerRadius ElCornerRadius
        {
            get
            {
                return (CornerRadius)GetValue(ElCornerRadiusProperty);
            }
            set
            {
                SetValue(ElCornerRadiusProperty, value);
            }
        }



        /// <summary>
        /// 输入框选中边框颜色
        /// </summary>
        public static readonly DependencyProperty KeyboardFocusedBorderBrushProperty =
            DependencyProperty.Register("KeyboardFocusedBorderBrush", typeof(Brush), typeof(ElInput));   // new PropertyMetadata(0, null)

        /// <summary>
        /// 输入框选中边框颜色
        /// </summary>
        public Brush KeyboardFocusedBorderBrush
        {
            get
            {
                return (Brush)GetValue(KeyboardFocusedBorderBrushProperty);
            }
            set
            {
                SetValue(KeyboardFocusedBorderBrushProperty, value);
            }
        }



        /// <summary>
        /// 提示输入内容
        /// </summary>
        public static readonly DependencyProperty PlaceholderTextProperty =
            DependencyProperty.Register("PlaceholderText", typeof(string), typeof(ElInput));   // new PropertyMetadata(0, null)

        /// <summary>
        /// 提示输入内容
        /// </summary>
        public string PlaceholderText
        {
            get
            {
                return (string)GetValue(PlaceholderTextProperty);
            }
            set
            {
                SetValue(PlaceholderTextProperty, value);
            }
        }
        


    }
}